<?php
/*
 * Smarty plugin
 * -------------------------------------------------------------
 * File:     function.build_url.php
 * Type:     function
 * Name:     assign
 * Purpose:  build image tag from image url
 * Author:   Pham Van Diep
 * Date:     20/2/2014
 * Params:   
 *           string path : path to directory 
 *			 string name : name of image file			 
 * Return:   string html image tag
 * -------------------------------------------------------------
 */
function smarty_function_get_img_tag($params , &$template) {		
	$strPath   = isset($params['path'])   ? trim($params['path']) : '' ;    
	$strAlt    = isset($params['alt'])    ? trim($params['alt'])  : DOMAIN;			
	return '<img src="'.$strPath.'" alt="'.$strAlt.'" />';
}